<!--
 * @Author: lihaogn
 * @Date: 2021-12-15 23:41:42
 * @LastEditTime: 2021-12-16 21:41:48
 * @LastEditor: lihaogn
 * @Description: 基本的 drawer 模板
 * @FilePath: \lix-admin-vue2\src\views\demo\template\modules\DrawerBasicDemo.vue
-->
<template>
  <el-drawer
    :title="title"
    :visible.sync="drawerVisible"
    :size="500"
    @close="handleDrawerClose"
  >
    <div class="gl-drawer-body">
      <div class="gl-drawer-main">基本的 drawer 模板</div>
      <div class="gl-drawer-footer-btn">
        <el-button type="primary" @click="handleDrawerOk">确定</el-button>
      </div>
    </div>
  </el-drawer>
</template>
<script>
import { drawerMixin } from '../../../mixins/drawer'

export default {
  mixins: [drawerMixin],
  data() {
    return {}
  },
  methods: {
    handleDrawerClose() {
      console.log('drawer close')
      this.$emit('update:visible', false)
    },
    handleDrawerOk() {
      console.log('drawer ok')
      this.drawerVisible = false
      this.$emit('ok')
    }
  }
}
</script>
<style lang="less" scoped></style>
